package com.myc.subject.domain.convert;

import com.myc.subject.domain.entity.SubjectCategoryBO;
import com.myc.subject.infra.basic.entity.SubjectCategory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 将BO转为 SubjectCategory的拦截器,使用mapstruct的工厂进行转换
 * */
@Mapper
public interface SubjectCategoryConverter {

    SubjectCategoryConverter INSTANCE = Mappers.getMapper(SubjectCategoryConverter.class);

    SubjectCategory convertBoToCategory(SubjectCategoryBO subjectCategoryBO);

    List<SubjectCategoryBO> convertToCategoryBo(List<SubjectCategory> subjectCategories);


}
